# -*- coding: utf-8 -*

__author__ = 'huangxiaoli'

import time
import requests

if __name__ == "__main__":
    post_url = 'http://192.168.1.201:20001/'
    filename = 'swoole_test.txt'
    while True:
        r = requests.get(post_url)
        # 打印返回值
        with open(filename, 'ab+') as fd:
            for chunk in r.iter_content(1024):
                fd.write(chunk)
        time.sleep(5)